﻿using Controller.Enum;
using DPS.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ControllerManageServer.ActionModel.AioiNW
{
    /// <summary>
    /// 爱鸥NW系列的运行模式
    /// </summary>
    abstract class AioiNWActionModelAbstract : ActionModelAbstract
    {
        /// <summary>
        /// 是否打开蜂鸣器
        /// </summary>
        internal bool IsOpenBuzzers;
        /// <summary>
        /// 亮灯模式
        /// </summary>
        internal CommCmdLightModeEnum LightMode;

        /// <summary>
        /// 获取亮灯颜色
        /// </summary>
        /// <param name="iMode"></param>
        protected byte GetLightColor(CommCmdLightModeEnum iMode) {
            switch (iMode) {
                case CommCmdLightModeEnum.BLUE:
                case CommCmdLightModeEnum.SPARKLE_BLUE:
                    return 4;
                case CommCmdLightModeEnum.GREEN:
                case CommCmdLightModeEnum.SPARKLE_GREEN:
                    return 2;
                case CommCmdLightModeEnum.LIGHT_BLUE:
                case CommCmdLightModeEnum.SPARKLE_LIGHT_BLUE:
                    return 6;
                case CommCmdLightModeEnum.RED:
                case CommCmdLightModeEnum.SPARKLE_RED:
                    return 1;
                case CommCmdLightModeEnum.PURPLE:
                case CommCmdLightModeEnum.SPARKLE_PURPLE:
                    return 5;
                case CommCmdLightModeEnum.ORANGE:
                case CommCmdLightModeEnum.SPARKLE_ORANGE:
                    return 3;
                case CommCmdLightModeEnum.WHITE:
                case CommCmdLightModeEnum.SPARKLE_WHITE:
                    return 7;
                default:
                    return 0;
            }
        }
    }
}
